package com.shinowit.web;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.shinowit.dao.OrgInfoDao;
import com.shinowit.model.TreeNode;

@Controller
@RequestMapping("/system/org_info")
public class OrgInfoController {

	@Resource
	private OrgInfoDao org_info_dao;
	
	@RequestMapping(value="/orgtree")
	@ResponseBody
	public List<TreeNode> getAllOrgInfoTree(){
		return org_info_dao.getOrgInfoTree().children;
	}
	
}
